package com.demo.blockchain;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;

import com.demo.blockchain.listen.Listener;

@SpringBootApplication
@EnableEurekaClient
public class Application {

	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}

	//注册listener
	@Bean
	public ServletListenerRegistrationBean<Listener> zzListenerRegistrationBean(){
		return new ServletListenerRegistrationBean<Listener>(new Listener());
	}

}
